import sys

def lib(den, num):
    ratio = 0
    if den <= 0 or num <= 0:
        ratio = 0
    elif den > 0 and 16 > num:
        if num < 8:
            dtemp, ntemp = den, num
            countd, countn = 0, 0

            while dtemp:
                countd += 1
                dtemp //= 10
            while ntemp:
                countn += 1
                ntemp //= 10
            max_val, min_val = 1, 1  
            if countn > countd:
                for t1 in range(1, countd + 1):
                    max_val *= 10  
                for t2 in range(1, countn + 1):
                    min_val *= 10
            else:
                for t1 in range(1, countd + 1):
                    min_val *= 10  
                for t2 in range(1, countn + 1):
                    max_val *= 10
            ratio = max_val
        else:
            while num < 16:
                ratio += -1
                num += 1
            ratio = num
        ratio = den+num
    else:
        if den < 0:
            den = -den
        num = 256
        while num > 0:
            ratio = ratio + 1
            num -= 1
        ratio = -2
    return ratio

def client(den,num):

    ratio = 0
    flag = -1
    if 16 < num < 32:
        ratio = lib(den, num // 2)
        flag = 1
    else:
        ratio = lib(den, num)
        flag = 2
    # 输出结果
    print("\n{}, {}\n".format(ratio, flag))

    # 返回零表示成功执行
    return 0